use :: libc;
extern "C" {
    pub type url_key_value;
    fn free(_: *mut libc::c_void);
    fn url_data_inspect(data: *const url_data_t);
    fn url_is_protocol(str: *const i8) -> bool;
    fn url_free(data: *mut url_data_t);
    fn url_get_port(url: *const i8) -> *mut i8;
    fn url_get_fragment(url: *const i8) -> *mut i8;
    fn url_get_query_value(url: *const url_data_t, key: *const i8) -> *const i8;
    fn url_get_path(url: *const i8) -> *mut i8;
    fn url_get_hostname(url: *const i8) -> *mut i8;
    fn url_get_userinfo(url: *const i8) -> *mut i8;
    fn url_get_scheme(url: *const i8) -> *mut i8;
    fn url_parse(url: *const i8) -> *mut url_data_t;
    fn __assert_fail(
        __assertion: *const i8,
        __file: *const i8,
        __line: u32,
        __function: *const i8,
    ) -> !;
    fn strcmp(_: *const i8, _: *const i8) -> i32;
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct url_data {
    pub whole_url: *mut i8,
    pub protocol: *const i8,
    pub userinfo: *const i8,
    pub host: *const i8,
    pub port: *const i8,
    pub path: *const i8,
    pub query: *const url_key_value,
    pub fragment: *const i8,
}
pub type url_data_t = url_data;
#[inline]
extern "C" fn url_get_protocol(mut url: *const i8) -> *mut i8 {
    return unsafe { url_get_scheme(url) };
}
fn main_0() -> i32 {
    let mut gh_url: *mut i8 =
        b"git://git@github.com:jwerle/url.h.git\0" as *const u8 as *const i8 as *mut i8;
    let mut url : * mut i8 = b"http://user:pass@subdomain.host.com:8080/p/%C3%A5/t/h?qu%C3%ABry=strin%C4%9F&foo=bar=yuk&key%23%26%3D=%25&lol#h%C3%a6sh\0" as * const u8 as * const i8 as * mut i8 ;
    let mut parsed: *mut url_data_t = unsafe { url_parse(url) };
    let mut gh_parsed: *mut url_data_t = unsafe { url_parse(gh_url) };
    if !parsed.is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"parsed\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                25 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if !gh_parsed.is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"gh_parsed\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                26 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    (unsafe { url_data_inspect(parsed) });
    (unsafe { url_data_inspect(gh_parsed) });
    if !(unsafe { (*parsed).whole_url }).is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"parsed->whole_url\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                31 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if !(unsafe { (*parsed).protocol }).is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"parsed->protocol\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                32 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if !(unsafe { (*parsed).userinfo }).is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"parsed->userinfo\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                33 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if !(unsafe { (*parsed).host }).is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"parsed->host\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                34 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if !(unsafe { (*parsed).port }).is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"parsed->port\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                35 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if !(unsafe { (*parsed).path }).is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"parsed->path\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                36 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if !(unsafe { (*parsed).query }).is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"parsed->query\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                37 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if !(unsafe { (*parsed).fragment }).is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"parsed->fragment\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                38 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if !(unsafe { (*gh_parsed).whole_url }).is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"gh_parsed->whole_url\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                40 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if !(unsafe { (*gh_parsed).protocol }).is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"gh_parsed->protocol\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                41 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if !(unsafe { (*gh_parsed).userinfo }).is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"gh_parsed->userinfo\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                42 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if !(unsafe { (*gh_parsed).host }).is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"gh_parsed->host\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                43 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if !(unsafe { (*gh_parsed).path }).is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"gh_parsed->path\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                44 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if (unsafe { url_is_protocol(b"http\0" as *const u8 as *const i8) }) as i32 != 0 {
    } else {
        (unsafe {
            __assert_fail(
                b"url_is_protocol(\"http\")\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                46 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if (unsafe { url_is_protocol(b"https\0" as *const u8 as *const i8) }) as i32 != 0 {
    } else {
        (unsafe {
            __assert_fail(
                b"url_is_protocol(\"https\")\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                47 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if (unsafe { url_is_protocol(b"git\0" as *const u8 as *const i8) }) as i32 != 0 {
    } else {
        (unsafe {
            __assert_fail(
                b"url_is_protocol(\"git\")\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                48 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if (unsafe { url_is_protocol(b"ssh\0" as *const u8 as *const i8) }) as i32 != 0 {
    } else {
        (unsafe {
            __assert_fail(
                b"url_is_protocol(\"ssh\")\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                49 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if (unsafe { url_is_protocol(b"sftp\0" as *const u8 as *const i8) }) as i32 != 0 {
    } else {
        (unsafe {
            __assert_fail(
                b"url_is_protocol(\"sftp\")\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                50 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if (unsafe { url_is_protocol(b"ftp\0" as *const u8 as *const i8) }) as i32 != 0 {
    } else {
        (unsafe {
            __assert_fail(
                b"url_is_protocol(\"ftp\")\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                51 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if (unsafe { url_is_protocol(b"javascript\0" as *const u8 as *const i8) }) as i32 != 0 {
    } else {
        (unsafe {
            __assert_fail(
                b"url_is_protocol(\"javascript\")\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                52 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    let mut s: *mut i8 = url_get_protocol(url);
    if !s.is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"s\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                54 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if (unsafe { strcmp(b"http\0" as *const u8 as *const i8, s) }) == 0 as i32 {
    } else {
        (unsafe {
            __assert_fail(
                b"strcmp(\"http\", s) == 0\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                54 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    (unsafe { free(s as *mut libc::c_void) });
    let mut s_0: *mut i8 = unsafe { url_get_userinfo(url) };
    if !s_0.is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"s\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                55 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if (unsafe { strcmp(b"user:pass\0" as *const u8 as *const i8, s_0) }) == 0 as i32 {
    } else {
        (unsafe {
            __assert_fail(
                b"strcmp(\"user:pass\", s) == 0\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                55 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    (unsafe { free(s_0 as *mut libc::c_void) });
    let mut s_1: *mut i8 = unsafe { url_get_hostname(url) };
    if !s_1.is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"s\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                56 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if (unsafe { strcmp(b"subdomain.host.com\0" as *const u8 as *const i8, s_1) }) == 0 as i32 {
    } else {
        (unsafe {
            __assert_fail(
                b"strcmp(\"subdomain.host.com\", s) == 0\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                56 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    (unsafe { free(s_1 as *mut libc::c_void) });
    let mut s_2: *mut i8 = unsafe { url_get_path(url) };
    if !s_2.is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"s\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                57 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if (unsafe { strcmp(b"/p/\xC3\xA5/t/h\0" as *const u8 as *const i8, s_2) }) == 0 as i32 {
    } else {
        (unsafe {
            __assert_fail(
                b"strcmp(\"/p/\\xc3\\xa5/t/h\", s) == 0\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                57 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    (unsafe { free(s_2 as *mut libc::c_void) });
    if (unsafe {
        strcmp(
            b"strin\xC4\x9F\0" as *const u8 as *const i8,
            url_get_query_value(parsed, b"qu\xC3\xABry\0" as *const u8 as *const i8),
        )
    }) == 0 as i32
    {
    } else {
        (unsafe {
            __assert_fail(
            b"strcmp(\"strin\\xc4\\x9f\", url_get_query_value (parsed, \"qu\\xc3\\xabry\"))==0\0"
                as *const u8 as *const i8,
            b"test.c\0" as *const u8 as *const i8,
            58 as i32 as u32,
            (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
        )
        });
    };
    if (unsafe {
        strcmp(
            b"bar=yuk\0" as *const u8 as *const i8,
            url_get_query_value(parsed, b"foo\0" as *const u8 as *const i8),
        )
    }) == 0 as i32
    {
    } else {
        (unsafe {
            __assert_fail(
                b"strcmp(\"bar=yuk\", url_get_query_value (parsed, \"foo\"))==0\0" as *const u8
                    as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                59 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if (unsafe {
        strcmp(
            b"%\0" as *const u8 as *const i8,
            url_get_query_value(parsed, b"key#&=\0" as *const u8 as *const i8),
        )
    }) == 0 as i32
    {
    } else {
        (unsafe {
            __assert_fail(
                b"strcmp(\"%\", url_get_query_value (parsed, \"key#&=\"))==0\0" as *const u8
                    as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                60 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if (unsafe {
        strcmp(
            b"\0" as *const u8 as *const i8,
            url_get_query_value(parsed, b"lol\0" as *const u8 as *const i8),
        )
    }) == 0 as i32
    {
    } else {
        (unsafe {
            __assert_fail(
                b"strcmp(\"\", url_get_query_value (parsed, \"lol\"))==0\0" as *const u8
                    as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                61 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    let mut s_3: *mut i8 = unsafe { url_get_fragment(url) };
    if !s_3.is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"s\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                62 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if (unsafe { strcmp(b"h\xC3\xA6sh\0" as *const u8 as *const i8, s_3) }) == 0 as i32 {
    } else {
        (unsafe {
            __assert_fail(
                b"strcmp(\"h\xC3\xA6sh\", s) == 0\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                62 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    (unsafe { free(s_3 as *mut libc::c_void) });
    let mut s_4: *mut i8 = unsafe { url_get_port(url) };
    if !s_4.is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"s\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                63 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if (unsafe { strcmp(b"8080\0" as *const u8 as *const i8, s_4) }) == 0 as i32 {
    } else {
        (unsafe {
            __assert_fail(
                b"strcmp(\"8080\", s) == 0\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                63 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    (unsafe { free(s_4 as *mut libc::c_void) });
    let mut s_5: *mut i8 = url_get_protocol(gh_url);
    if !s_5.is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"s\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                65 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if (unsafe { strcmp(b"git\0" as *const u8 as *const i8, s_5) }) == 0 as i32 {
    } else {
        (unsafe {
            __assert_fail(
                b"strcmp(\"git\", s) == 0\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                65 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    (unsafe { free(s_5 as *mut libc::c_void) });
    let mut s_6: *mut i8 = unsafe { url_get_hostname(gh_url) };
    if !s_6.is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"s\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                66 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if (unsafe { strcmp(b"github.com\0" as *const u8 as *const i8, s_6) }) == 0 as i32 {
    } else {
        (unsafe {
            __assert_fail(
                b"strcmp(\"github.com\", s) == 0\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                66 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    (unsafe { free(s_6 as *mut libc::c_void) });
    let mut s_7: *mut i8 = unsafe { url_get_userinfo(gh_url) };
    if !s_7.is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"s\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                67 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if (unsafe { strcmp(b"git\0" as *const u8 as *const i8, s_7) }) == 0 as i32 {
    } else {
        (unsafe {
            __assert_fail(
                b"strcmp(\"git\", s) == 0\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                67 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    (unsafe { free(s_7 as *mut libc::c_void) });
    let mut s_8: *mut i8 = unsafe { url_get_path(gh_url) };
    if !s_8.is_null() {
    } else {
        (unsafe {
            __assert_fail(
                b"s\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                68 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    if (unsafe { strcmp(b"jwerle/url.h.git\0" as *const u8 as *const i8, s_8) }) == 0 as i32 {
    } else {
        (unsafe {
            __assert_fail(
                b"strcmp(\"jwerle/url.h.git\", s) == 0\0" as *const u8 as *const i8,
                b"test.c\0" as *const u8 as *const i8,
                68 as i32 as u32,
                (*::core::mem::transmute::<&[u8; 15], &[i8; 15]>(b"int main(void)\0")).as_ptr(),
            )
        });
    };
    (unsafe { free(s_8 as *mut libc::c_void) });
    (unsafe { url_free(parsed) });
    (unsafe { url_free(gh_parsed) });
    return 0 as i32;
}
pub fn main() {
    ::std::process::exit(main_0() as i32)
}
